home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #9
/
Amiga Plus CD - 2004 - No. 09.iso
/
amigaplus
/
tools
/
amigaos4_only
/
ifxlite
/
imagefx3
/
rexx
/
border.ifx
< prev
next >
Wrap
Text File
|
2004-08-03
|
2KB
|
99 lines
/*
* $VER: Border 3.0 (13.2.98)
*
* Arexx program for the ImageFX image processing system.
* Written by Thomas Krehbiel
*
* Revised for ImageFX release 2.0.
*
* This program will generate a 3D-looking border around the
* current image.
*
*/
OPTIONS RESULTS
GetMain ; IF result = "" THEN EXIT ; PARSE VAR result name width height depth
RequestNumber '"Border Thickness (Pixels):"' 10
IF rc ~= 0 THEN EXIT 0 /* cancelled? */
count = result
LockInput
SaveUndo ; Undo Off
BeginBar 'Border' count
LockGUI
Redraw Off
step = 255 / (count-3)
grey = step
le = 0
te = 0
wid = width
ht = height
DO i = 0 TO count - 3
UnlockGUI Quiet
Bar i
LockGUI
/* the bright side */
SetPalette '-1' grey grey grey
Line le te le+wid-1 te
Line le te le te+ht-1
/* the dark side */
SetPalette '-1' grey*2/3 grey*2/3 grey*2/3
Line le+wid-1 te le+wid-1 te+ht-1
Line le+wid-1 te+ht-1 le te+ht-1
grey = grey + step
le = le + 1
te = te + 1
wid = wid - 2
ht = ht - 2
END
grey = 255 - step
DO WHILE i < count
UnlockGUI Quiet
Bar i
LockGUI
/* the bright side */
SetPalette '-1' grey grey grey
Line le te le+wid-1 te
Line le te le te+ht-1
/* the dark side */
SetPalette '-1' grey*2/3 grey*2/3 grey*2/3
Line le+wid-1 te le+wid-1 te+ht-1
Line le+wid-1 te+ht-1 le te+ht-1
grey = grey - step
le = le + 1
te = te + 1
wid = wid - 2
ht = ht - 2
i = i + 1
END
UnlockGUI
EndBar
Redraw On ; Undo On
Redraw
UnlockInput
EXIT